package com.advertisementsystem.Servie;

import com.advertisementsystem.Dto.RegisterDTO;
import com.advertisementsystem.Dto.UserQueryDTO;
import com.advertisementsystem.Dto.UserUpdateDTO;
import com.advertisementsystem.entity.User;
import com.advertisementsystem.Exception.ResponseResult;
import com.advertisementsystem.vo.UserInfoVO;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;

import java.util.List;

public interface UserService {
    ResponseResult<?> register(RegisterDTO registerDTO);

    ResponseResult<?> updateUserInfo(UserUpdateDTO userUpdateDTO);

    ResponseResult<UserInfoVO> getUserInfo();




    // 创建用户
    User createUser(User user);

    // 更新用户信息
    User updateUser(User user);

    // 删除用户
    boolean deleteUser(Long id);

    // 获取用户详情
    User getUserById(Long id);

    // 分页查询用户列表
    Page<User> listUsers(UserQueryDTO queryDTO);

    // 修改用户状态
    boolean updateUserStatus(Long id, Integer status);

    // 修改密码
    boolean updatePassword(Long id, String newPassword);

    IPage<User> page(Page<User> page, LambdaQueryWrapper<User> queryWrapper);

    List<Long> getUserIdsByRoleId(Long roleId);

    List<Long> getAllUserIds();

    User getUserByUsername(String username);
}
